package cate.game.role.res.leader.hallows;

import cate.common.table.hallow.row.HallowHolySealRow;
import cate.game.GameBody;
import cate.game.res.MixRes;
import cp.solution.pattern.ICopiable;
import easy.java.dev.note.NoteField;

public class HallowHolySeal implements ICopiable<HallowHolySeal> {
    @NoteField(value = "类型")
    public int type;

    @NoteField(value = "等级")
    public int level;


    public HallowHolySeal(int type, int level) {
        this.type = type;
        this.level = level;
    }

    public HallowHolySeal() {

    }

    @Override
    public HallowHolySeal copy() {
        HallowHolySeal cp = new HallowHolySeal();
        cp.type = this.type;
        cp.level = this.level;
        return cp;
    }

    public MixRes back(GameBody game) {
        MixRes backReward = new MixRes();
        HallowHolySealRow row = game.table.hallow.holySeal.getRowByTypeAndLevel(type, level);
        this.level = 0;
        if (row == null) {
            return backReward;
        }
        backReward.addList(new MixRes(row.backStr));
        return backReward;
    }
}
